package com.xbongbong.pro.enums.coolapp.enums;

import lombok.Getter;

import java.util.Objects;

/***
 * 卡片应用场景
 *
 * @author hongxiao
 * @date 2022-06-09 19:31
 * @since
 * @version
 */
@Getter
public enum CardUseSceneEnum {
    /**
     * 欢迎语
     */
    WELCOME(0, "欢迎语"),
    /**
     * 业务
     */
    BUSINESS(1, "业务"),
    /**
     * 阶段推进器
     */
    STAGE(2, "阶段推进器"),
    /**
     * 审批工作流
     */
    PROCESS_OR_WORKFLOW(3, "审批工作流"),
    /**
     * 跟进记录回复
     */
    COMMUNICATE_REPLY(4, "跟进记录回复"),
    /**
     * 跟进提醒
     */
    REMIND(5, "跟进提醒"),
    /**
     * 访客计划提醒
     */
    COMMUNICATE_PLAN_REMIND(6, "访客计划提醒"),

    WORK_REPORT_REMIND(7,"工作报告一键提醒写报告"),
    /**
     * 吊顶卡片
     */
    TOP_CARD(8, "吊顶卡片");

    ;

    private final Integer type;

    private final String name;

    CardUseSceneEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static CardUseSceneEnum getByType(Integer useScene) {
        for (CardUseSceneEnum cache : values()) {
            if (Objects.equals(cache.type, useScene)) {
                return cache;
            }
        }
        return null;
    }
}
